package com.iplatform.file.function.quartz.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.iplatform.module.annotation.KeyId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

/**
 *
 * @author Dair
 * @since 
 */

/**
 * 资源任务信息
 */
@ApiModel(value = "com-iplatform-data-function-quartz-domain-QrtzJobInfo")
@Data
public class QrtzJobInfo implements Serializable {
	/**
	 * 记录id
	 */
	@ApiModelProperty(value = "记录id",required = false)
	@KeyId
	private Long qrtzJobInfoId;
	
	/**
	 * 任务名称
	 */
	@ApiModelProperty(value = "任务名称",required = true)
	@NotEmpty(message = "任务名称不能为空")
	private String jobName;
	
	/**
	 * 任务分组
	 */
	@ApiModelProperty(value = "任务分组",hidden = true)
	private String jobGroup;
	
	/**
	 * 前置机id
	 */
	@ApiModelProperty(value = "前置机id",required = true)

	private Long fkFrontCompId;
	

	
	/**
	 * 资源目录
	 */
	@ApiModelProperty(value = "资源目录",required = true)

	private String sourceDir;
	
	/**
	 * 前置机子目录
	 */
	@ApiModelProperty(value = "前置机子目录",required = true)
	@NotEmpty(message = "前置机子目录不能为空")
	private String targetDir;
	/**
	 * 同步类型(1 重复定时任务 2 指定时间任务 3 手动执行任务)
	 */
	@ApiModelProperty(value = "同步类型(1 重复定时任务 2 指定时间任务 3 手动执行任务)",required = true)

	private String executeType;
	
	/**
	 * 定时任务表达式
	 */
	@ApiModelProperty(value = "定时任务表达式")
	private String cron;
	
	
	/**
	 * 执行时间
	 */
	@ApiModelProperty(value = "执行时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date executeTime;
	
	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间",hidden = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	
	/**
	 * 更新时间
	 */
	@ApiModelProperty(value = "更新时间",hidden = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date updateTime;
	
	/**
	 * 创建者
	 */
	@ApiModelProperty(value = "创建者",hidden = true)
	private String createBy;
	
	/**
	 * 更新者
	 */
	@ApiModelProperty(value = "更新者",hidden = true)
	private String updateBy;
	
	/**
	 * 删除标志
	 */
	@ApiModelProperty(value = "删除标志",hidden = true)
	private String isDeleted;
	
	
	@ApiModelProperty(value = "前置机子目录名称",required = true)
	private String targetDirName;
	
	
	@ApiModelProperty(value = "前置机组织机构ids",hidden = true)
	private String organiztionIds;


	@ApiModelProperty(value = "区别类型 1:前置机任务  2:资源任务")
	private Integer  workType;


	@ApiModelProperty(value = "1:新建 2：追加   3：覆盖 ")
	private Integer generateType;

	@ApiModelProperty(value = "表名")
	private String  tableCode;


	private static final long serialVersionUID = 1L;
}